Skip to content

fix(schedule): correct tall view rendering for reservations with hidden blocked periods#1146

Open
JohnVillalovos wants to merge 1 commit intodevelopfrom
jlvillal/start_date
Open

fix(schedule): correct tall view rendering for reservations with hidden blocked periods#1146
JohnVillalovos wants to merge 1 commit intodevelopfrom
jlvillal/start_date

Conversation

@JohnVillalovos
Copy link
Collaborator

@JohnVillalovos JohnVillalovos commented Mar 15, 2026

When a reservation ends in a hidden blocked period, the exact end cell
doesn't exist in the DOM and findClosestEnd() picks the nearest earlier
slot. This caused two issues in ScheduleTall view:

  1. The reservation div height was too short because it only reached the
    top of the last visible slot instead of extending through its bottom.

  2. The div's data-start/data-end attributes used the approximate cell's
    data-min value instead of the reservation's actual timestamps, which
    could cause conflict detection to miss overlapping reservations.

Fix by introducing an isEndApproximate flag to add the missing slot
height, and by using res.StartDate/res.EndDate directly for data
attributes on reservation and buffer divs.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes ScheduleTall (flipped) reservation rendering when blocked period rows are hidden by ensuring multi-slot reservations visually extend through the final reservable slot.

Changes:

  • Adjust ScheduleTall reservation height calculation when the end cell is inferred via findClosestEnd().
  • Extend the existing single-slot height === 0 handling to also cover multi-slot height truncation when blocked periods are absent.

You can also share your feedback on Copilot code review. Take the survey.

@JohnVillalovos JohnVillalovos marked this pull request as ready for review March 20, 2026 02:52
@JohnVillalovos JohnVillalovos force-pushed the jlvillal/start_date branch 2 times, most recently from 63c9c93 to 1be1407 Compare March 20, 2026 03:19
@JohnVillalovos JohnVillalovos requested a review from Copilot March 20, 2026 03:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes rendering in the “ScheduleTall (flipped)” view when hide.blocked.periods = true causes the reservation end cell (typically the immediately-following blocked period) to be absent from the DOM, which previously made multi-slot reservations render one row too short.

Changes:

  • Track when findClosestEnd() was used (end cell missing) and extend Tall-view reservation height through the bottom of the final visible slot row.
  • Ensure the rendered reservation/buffer data-end reflects the reservation’s actual end time when the end cell is approximate, improving conflict detection correctness.

@JohnVillalovos JohnVillalovos force-pushed the jlvillal/start_date branch 3 times, most recently from 1fe9051 to e12a613 Compare March 20, 2026 03:49
@JohnVillalovos JohnVillalovos changed the title fix(schedule): correct tall view height for reservations ending befor… fix(schedule): correct tall view rendering for reservations with hidden blocked periods Mar 20, 2026
@JohnVillalovos JohnVillalovos requested a review from Copilot March 20, 2026 03:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

…en blocked periods

When a reservation ends in a hidden blocked period, the exact end cell
doesn't exist in the DOM and findClosestEnd() picks the nearest earlier
slot. This caused two issues in ScheduleTall view:

1. The reservation div height was too short because it only reached the
   top of the last visible slot instead of extending through its bottom.

2. The div's data-start/data-end attributes used the approximate cell's
   data-min value instead of the reservation's actual timestamps, which
   could cause conflict detection to miss overlapping reservations.

Fix by introducing an isEndApproximate flag to add the missing slot
height, and by using res.StartDate/res.EndDate directly for data
attributes on reservation and buffer divs.

Closes: #920
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants